<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShareSendGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('share_send_goods', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->comment('用户id')->index();
            $table->integer('goods_id')->default(1)->comment('商品id');
            $table->tinyInteger('goods_type')->default(1)->comment('赠送商品类型：0：其他 1：头饰 2：座驾 3：气泡');
            $table->tinyInteger('time_limit')->default(1)->comment('赠送天数');
            $table->tinyInteger('goods_status')->default(0)->comment('0正常');
            $table->tinyInteger('send_type')->default(1)->comment('1为邀请赠送');
            $table->string('msg',255)->comment('备注信息');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('share_send_goods');
    }
}
